/**
 * API Mock 数据
 * 用于前端测试，避免依赖后端
 */

// 商家详情Mock数据
export const MOCK_MERCHANT_DETAIL = {
  merchantId: 1,
  merchantName: '超级麻辣小面馆',
  avatarUrl: '/static/shangjia01.png',
  rating: 4.8,
  salesCount: 2345,
  minOrderAmount: 20,
  deliveryFee: 3,
  estimatedDeliveryTime: 30,
  tags: '川菜,快餐,面食',
  contactPhone: '13800138000',
  address: '贵州省贵阳市观山湖区大数据科创城1栋',
  businessHours: '09:00 - 22:00',
  notice: '欢迎光临！本店主打重庆风味麻辣小面，辣度可调整，请在备注中说明。'
};

// 商家分类及商品Mock数据
export const MOCK_CATEGORIES = [
  {
    categoryId: 1,
    categoryName: '招牌面食',
    sortOrder: 1,
    products: [
      {
        productId: 1,
        name: '麻辣小面200g套餐',
        description: '重庆特色小面，麻辣鲜香，劲道爽滑',
        imageUrl: '/static/food01.png',
        price: 15.8,
        regionPrice: 15.8,
        salesCount: 256,
        tastes: [
          {
            tasteId: 1,
            name: '辣度',
            options: '["微辣","中辣","特辣","变态辣"]',
            extraPrice: 0
          },
          {
            tasteId: 2,
            name: '份量',
            options: '["小份","中份","大份"]',
            extraPrice: 2
          }
        ]
      },
      {
        productId: 2,
        name: '红烧牛肉面',
        description: '精选牛肉，红烧入味，汤浓肉嫩',
        imageUrl: '/static/food02.png',
        price: 18.0,
        regionPrice: 18.0,
        salesCount: 189,
        tastes: [
          {
            tasteId: 3,
            name: '辣度',
            options: '["不辣","微辣","中辣"]',
            extraPrice: 0
          },
          {
            tasteId: 4,
            name: '份量',
            options: '["标准","加大份"]',
            extraPrice: 3
          }
        ]
      },
      {
        productId: 3,
        name: '酸辣粉',
        description: '正宗重庆酸辣粉，酸爽开胃',
        imageUrl: '/static/food03.png',
        price: 12.0,
        regionPrice: 12.0,
        salesCount: 342,
        tastes: []
      },
      {
        productId: 4,
        name: '重庆小面',
        description: '传统重庆小面，麻辣鲜香',
        imageUrl: '/static/food01.png',
        price: 10.8,
        regionPrice: 10.8,
        salesCount: 167,
        tastes: [
          {
            tasteId: 5,
            name: '辣度',
            options: '["微辣","中辣","特辣"]',
            extraPrice: 0
          }
        ]
      }
    ]
  },
  {
    categoryId: 2,
    categoryName: '特色小吃',
    sortOrder: 2,
    products: [
      {
        productId: 5,
        name: '麻辣烫',
        description: '多种食材可选，麻辣鲜香',
        imageUrl: '/static/food02.png',
        price: 20.0,
        regionPrice: 20.0,
        salesCount: 128,
        tastes: [
          {
            tasteId: 6,
            name: '辣度',
            options: '["微辣","中辣","特辣"]',
            extraPrice: 0
          }
        ]
      },
      {
        productId: 6,
        name: '串串香',
        description: '经典川味串串，现烫现吃',
        imageUrl: '/static/food03.png',
        price: 25.0,
        regionPrice: 25.0,
        salesCount: 96,
        tastes: []
      }
    ]
  },
  {
    categoryId: 3,
    categoryName: '饮料',
    sortOrder: 3,
    products: [
      {
        productId: 7,
        name: '冰镇酸梅汤',
        description: '解辣必备，酸甜可口',
        imageUrl: '/static/food01.png',
        price: 6.0,
        regionPrice: 6.0,
        salesCount: 445,
        tastes: [
          {
            tasteId: 7,
            name: '温度',
            options: '["常温","少冰","多冰"]',
            extraPrice: 0
          }
        ]
      },
      {
        productId: 8,
        name: '可乐',
        description: '经典可乐，冰爽解腻',
        imageUrl: '/static/food02.png',
        price: 5.0,
        regionPrice: 5.0,
        salesCount: 523,
        tastes: []
      }
    ]
  }
];

// 评价Mock数据
export const MOCK_REVIEWS = {
  rows: [
    {
      reviewId: 1,
      customerNickname: '张三',
      customerAvatarUrl: '/static/logo.png',
      score: 5,
      content: '味道很正宗，辣度刚好，面条很劲道！配送速度也很快，下次还会点！',
      images: '[]',
      replyContent: '感谢您的支持！我们会继续保持品质！',
      createdAt: '2024-01-15 12:30'
    },
    {
      reviewId: 2,
      customerNickname: '李四',
      customerAvatarUrl: '/static/logo.png',
      score: 5,
      content: '非常好吃！麻辣小面真的很赞，辣度适中，推荐变态辣的朋友试试！',
      images: '["/static/food01.png", "/static/food02.png"]',
      replyContent: '',
      createdAt: '2024-01-14 18:45'
    },
    {
      reviewId: 3,
      customerNickname: '王五',
      customerAvatarUrl: '/static/logo.png',
      score: 4,
      content: '味道不错，就是配送稍微慢了一点，但整体还是很满意的！',
      images: '[]',
      replyContent: '抱歉让您久等了，我们会加强配送效率！',
      createdAt: '2024-01-13 20:15'
    }
  ],
  total: 3
};

// 订单提交成功Mock返回
export const MOCK_ORDER_RESPONSE = {
  code: 200,
  msg: '订单提交成功',
  data: {
    orderId: Math.floor(Math.random() * 100000) + 10000, // 随机订单ID
    orderNumber: `ORDER${Date.now()}`,
    totalAmount: 0, // 会被实际计算
    status: 1 // 待支付
  }
};